<ui:composition template="template.xhtml"
				xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.prime.com.tr/ui">
<link rel="stylesheet" href="../css/style.css" type="text/css"/>
<ui:define name="body">
<table>
	<tr>
		<td class="texto3"  style="height:400px;width:900px;background-color: #F5F5DC" align="center">
		<h:form>
			<p:dataTable id="tbl" var="aluno" value="#{relatorioBean.listaCompletaAlunos}" paginatorPosition="bottom" paginator="true" rows="10" emptyMessage="#{msg.label_nenhum_registro}">
				<p:column width="400" filterBy="#{aluno.nomeCompleto}">
					<f:facet name="header">
						<h:outputText value="#{msg.label_nome_completo}" />
					</f:facet>
						<h:outputText value="#{aluno.nomeCompleto}" />
				</p:column>
				<p:column width="100">
					<f:facet name="header">
						<h:outputText value="#{msg.label_idade}" />
					</f:facet>
						<h:outputText value="#{aluno.idade}"/>
				</p:column>
				<p:column width="200">
					<f:facet name="header">
						<h:outputText value="#{msg.label_data_nascimento}" />
					</f:facet>
						<h:outputText styleClass="outputLabel" value="#{aluno.dataNascimento}" >
			                     	 <f:convertDateTime pattern="dd/MMM/yyyy" />
			            </h:outputText>
				</p:column>
				<p:column width="200">
					<f:facet name="header">
						<h:outputText value="#{msg.label_data_cadastro}" />
					</f:facet>
					<h:outputText value="#{aluno.dataCadastro}" >
						<f:convertDateTime pattern="dd/MMM/yyyy" />
					</h:outputText>
				</p:column>
			</p:dataTable>
	
			<h:panelGrid columns="2">
				<p:panel header="#{msg.label_exportar_todos}">
					<h:commandLink>
						<p:graphicImage value="../images/excel.png" />
						<p:dataExporter type="xls" target="tbl" fileName="listaCompletaAlunos" />
					</h:commandLink>

					<h:commandLink>
						<p:graphicImage value="../images/pdf.png" />
						<p:dataExporter type="pdf" target="tbl" fileName="listaCompletaAlunos" preProcessor="#{relatorioBean.preProcessPDF}"/>
					</h:commandLink>
		
					<h:commandLink>
						<p:graphicImage value="../images/csv.png" />
						<p:dataExporter type="csv" target="tbl" fileName="listaCompletaAlunos" />
					</h:commandLink>		
				</p:panel>
	
				<p:panel header="#{msg.label_exportar_pagina}">
					<h:commandLink>
						<p:graphicImage value="../images/excel.png" />
						<p:dataExporter type="xls" target="tbl" fileName="cars" pageOnly="true"/>
					</h:commandLink>
			
					<h:commandLink>
						<p:graphicImage value="../images/pdf.png" />
						<p:dataExporter type="pdf" target="tbl" fileName="cars" pageOnly="true" preProcessor="#{relatorioBean.preProcessPDF}"/>
					</h:commandLink>
					
					<h:commandLink>
						<p:graphicImage value="../images/csv.png" />
						<p:dataExporter type="csv" target="tbl" fileName="cars" pageOnly="true"/>
					</h:commandLink>
				</p:panel>
			</h:panelGrid>
			</h:form>
		</td>
	</tr>
</table>
</ui:define>
</ui:composition>